The terrorists were killed in the encounter near Ratarwan village under Narot Jaimal Singh police station area, about 50 km from Pathankot, Punjab DGP P S Gill told PTI in Chandigarh.
The BSF has alerted Pathankot district police after spotting three to five suspects in Pakistan side near the Indo-Pak border.
Punjab Police and Border Security Force on Sunday carried out a joint search operation and flag march in villages near Indo-Pak border, amid a heightened vigil in the wake of the Uri attack a week ago.
The loud noise of helicopters deployed by the air force as part of intensive search operations also kept residents alert in the area.
However, no casualty was reported in the blast that took place late on Sunday night in front of Triveni gate of the cantonment.
It was the last conversation which was made on the SP's phone, which is believed to be used by the terrorists to make calls to Pakistan.
"They had AK-47 guns and they threatened to shoot us...They were speaking in Urdu, Hindi," said the police officer, who was interrogated for about six hours by the National Investigation Agency on Monday.
Pakistan wants to unsettle those living in hamlets along the International Border in Jammu and Punjab, say security personnel.
The NIA chief refrained from naming the terror group responsible for the attack.
Here's your weekly digest of the craziest stories from around the world.